/**
 * $RCSfile$
 * $Revision$
 * $Date$
 * $Source$
 * $Author$
 */
package pl.edu.agh.loganalizator.model;

import java.util.HashMap;

public class Row {

  private boolean parseDisable;

  private static int idGen = 0;
  Integer id;
  HashMap<Column, String> value;

  public Row() {
    id = idGen++;
    value = new HashMap<Column, String>();
  }

  public Integer getId() {
    return id;
  }

  public void add(Column col, String rowValue) {
    value.put(col, rowValue);
  }

  String getRovValue(Column key) {
    return value.get(key);
  }

  @Override
  public String toString() {
    if (parseDisable)
      return "";
    return value.toString() + "\n";
  }

  public void setDisable() {
    // TODO Auto-generated method stub
    this.parseDisable = true;
  }
  
  public void setEnable() {
    // TODO Auto-generated method stub
    this.parseDisable = false;
  }

}
